//
//  CaseModel.m
//  International_Hospital
//
//  Created by 张城 on 16/7/7.
//  Copyright © 2016年 LiYiLin. All rights reserved.
//

#import "CaseModel.h"

@implementation CaseModel


+ (instancetype)caseModelWithDic:(NSDictionary *)dic{
    CaseModel * model = [CaseModel new];
    [model setValuesForKeysWithDictionary:dic];
    return model;
}

-(void)encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeObject:_time forKey:@"time"];
    [aCoder encodeObject:_illnessType forKey:@"illnessType"];
    [aCoder encodeObject:_illnessDivide forKey:@"illnessDivide"];
    [aCoder encodeObject:_illnessDescribe forKey:@"illnessDescribe"];
    [aCoder encodeObject:_image forKey:@"image"];

    [aCoder encodeInteger:_bol forKey:@"bol"];
}
-(instancetype)initWithCoder:(NSCoder *)aDecoder{
    if (self = [super init]) {
        self.time = [aDecoder decodeObjectForKey:@"time"];
        self.illnessType = [aDecoder decodeObjectForKey:@"illnessType"];
        self.illnessDivide = [aDecoder decodeObjectForKey:@"illnessDivide"];
        self.illnessDescribe = [aDecoder decodeObjectForKey:@"illnessDescribe"];
        self.image = [aDecoder decodeObjectForKey:@"image"];

        self.bol = [aDecoder decodeIntegerForKey:@"bol"];
    }
    return self;
}







@end
